package com.books.mapper.book;

import com.books.model.entity.book.BookType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface BookTypeMapper {
    @Select("select * from bookcategory where category_name=#{categoryName}")
    BookType findByCategoryName(String categoryName);

    @Select("select * from bookcategory")
    List<BookType> findAll();

    @Select("select * from bookcategory where category_id=#{id}")
    BookType findById(int id);
}
